<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\recruitment\validate;

use think\Validate;

/**
 * 招聘列表验证器
 */
class recruitmentValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'lang_code' => 'require',
        'enterprise_id' => 'require',
        'province_id' => 'require',
        'city_id' => 'require',
        'district_id' => 'require',
        'position_name' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'lang_code' => '语言代码，如zh - CN、en - US等必须填写',
        'enterprise_id' => '招聘企业必须填写',
        'province_id'=>'工作省',
        'city_id' => '工作城市必须填写',
        'work_area' => '工作区域必须填写',
        'position_name' => '职位名称必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'lang_code',
            'enterprise_id',
            'province_id',
            'city_id',
            'district_id',
            'position_name',
        ],
        'update' => [
            'lang_code',
            'enterprise_id',
            'province_id',
            'city_id',
            'district_id',
            'position_name',
        ],
    ];

}
